<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head lang="en">
    <meta charset="UTF-8">
    <base href="${pageContext.request.contextPath}/">
    <title>系统登录 - 超市账单管理系统</title>
    <link rel="stylesheet" href="css/style.css"/>
    <script type="text/javascript" src="js/jQuery-1.8.3.js"></script>
</head>
<!-- 异步验证用户名 -->
<script type="text/javascript">
$(function(){
$("#user").blur(function(){

$.get("user/nameYanzheng.csdd","username="+this.value,function(data){
if(data=="false"){
$("#tishi").html("×");
}else{
$("#tishi").html("√");
}

});
});
});
</script>
<!-- 密码错误反馈 -->
<c:if test="${!  empty fankui}">
	<script type="text/javascript">
		alert("${fankui}");
	</script>
	<c:remove var="fankui" />
</c:if>
<body class="login_bg">
    <section class="loginBox">
        <header class="loginHeader">
            <h1>超市账单管理系统</h1>
        </header>
        <section class="loginCont">
        ${mag }
            <form class="loginForm" action="user/login.csdd">
                <div class="inputbox">
                    <label for="user">用户名：</label>
                    <input id="user" type="text" name="username" placeholder="请输入用户名" required/><span id="tishi" style="color: red"></span>
                </div>
                <div class="inputbox">
                    <label for="mima">密码：</label>
                    <input id="mima" type="password" name="password" placeholder="请输入密码" required/>
                </div>
                <div class="subBtn">
                    <input type="submit" value="登录" />
                    <input type="reset" value="重置"/>
                </div>

            </form>
        </section>
    </section>

</body>
</html>